package com.manlu.pojo;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Auther 漫路h
 * Created by 2020-05-14 16:01
 */
@Data
@Table(name = "category")
public class Category {
    @Id
    private Integer c_id;
    private String c_name;
    private String c_level;
    private String c_sort;
    private Date create_time;

    @Transient
    private Integer count;

    @Transient
    private List<Category> child = new ArrayList<Category>();

    /*
    CREATE TABLE `category` (
      `c_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '分类id',
      `c_name` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '分类名称',
      `c_level` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '分类级别-3级分类',
      `c_sort` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '分类排序级别',
      `create_time` datetime DEFAULT NULL COMMENT '分类创建时间',
      PRIMARY KEY (`c_id`) USING BTREE
    ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
     */
}
